#!/usr/bin/python
# -*- coding: UTF-8 -*-

str1 = 'I love china'
a = str1[:6]
print('a:', a)
b = str1[6]
print('b', b)
c = str1[5]
print('c', c)

str2 = str1[:6] + ' 插入的字符串' + str1[6:]
print('str2', str2)

str2 = 'xiaoxi'
d = str2.capitalize()
print('d', d)

str2 = 'DAXIExiaoxia'
str2 = str2.casefold()
print('str2', str2)

str3 = 'I\tlove\tkfc.cc'
print(str3)

f = str3.find('adf')
print(f)

f = str3.find('cc')
print(f)

str4 = '小沈'
s = str4.islower()
print('s', s);

str5 = 'DayuL'
t = str5.istitle()
print('t', t)

str5 = 'Dayul'
t = str5.istitle()
print('t', t)

str5 = 'dayul'
t = str5.istitle()
print('t', t)

t = str5.join('12345')
print(5)

str = '        i love you'
s = str.lstrip()
print('s', s)

str6 = 'i love money'
s = str6.partition('ov')
print('s6', s)
print(str6)

s = str6.replace('money', 'Money')
print('s', s)

s = str6.split()
print('spilt', s)

str7 = '   stsd'
s = str7.strip()
print('strip', s)

str7 = '   stsd'
s = str7.strip('s')
print('strip', s)

str7 = '   stsd'
s = str7.swapcase()
print('swapcase', s)

str7 = 'ssaaaassssss'
print('str7', str7)

s = str7.translate(str7.maketrans('s', 'b'))
print('translate', s)







